package com.softline.documentsmall.service.impl;

import com.softline.documentsmall.dao.DictionaryInfoMapper;
import com.softline.documentsmall.dao.DictionaryMapper;
import com.softline.documentsmall.entity.DictionaryInfoVO;
import com.softline.documentsmall.ret.BusinessErrorEnum;
import com.softline.documentsmall.ret.ReturnVO;
import com.softline.documentsmall.ret.ReturnVOUtils;
import com.softline.documentsmall.service.DictionaryInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class DictionaryInfoServiceImpl implements DictionaryInfoService {

    @Autowired
    DictionaryInfoMapper dictionaryInfoMapper;

    @Override
    public ReturnVO insert(DictionaryInfoVO dictionaryInfoVO) {
        try {
            dictionaryInfoMapper.insert(dictionaryInfoVO);
        }catch (Exception e){
            return ReturnVOUtils.businessFail(BusinessErrorEnum.FAIL);
        }
        return ReturnVOUtils.success();
    }
}
